package com.qijian.maindata.domain.query;

import com.baomidou.mybatisplus.annotation.TableName;
import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Set;


/**
 * 外协单对象 查询条件类
 *
 * @author qijian
 * @date 2021-10-15
 */

@Data
@ToString
@TableName("main_out")
public class OutQuery {

    @WhereType(filed = "out_id")
    private Long outId;
    @WhereType(filed = "supplier_id")
    private Long supplierId;
    @WhereType(filed = "supplier_name", type = WhereTypeEnum.LIKE)
    private String supplierName;
    @WhereType(filed = "out_total")
    private BigDecimal outTotal;
    @WhereType(filed = "out_code", type = WhereTypeEnum.LIKE)
    private String outCode;
    @WhereType(filed = "start_time")
    private Date startTime;
    @WhereType(filed = "end_time")
    private Date endTime;
    @WhereType(filed = "check_by", type = WhereTypeEnum.LIKE)
    private String checkBy;
    @WhereType(filed = "create_by", type = WhereTypeEnum.LIKE)
    private String createBy;
    @WhereType(filed = "approval_status")
    private String approvalStatus;
    @WhereType(filed = "approval_status", type = WhereTypeEnum.IN)
    private List<String> approvalStatusList;
    @WhereType(filed = "check_time")
    private Date checkTime;
    @WhereType(filed = "status", type = WhereTypeEnum.IN)
    private List<Integer> status;
    @WhereType(filed = "rate")
    private BigDecimal rate;
    @WhereType(filed = "out_id", type = WhereTypeEnum.IN)
    private Set<Long> ids;
    @WhereType(filed = "out_status", tableName = "main_out_detail_associated", type = WhereTypeEnum.IN)
    private List<Long> outStatus;
    @WhereType(filed = "out_supplier_name", tableName = "main_out_detail_associated", type = WhereTypeEnum.LIKE)
    private String outSupplierName;
    @WhereType(filed = "out_bound_code", tableName = "main_out_detail_associated", type = WhereTypeEnum.LIKE)
    private String outBoundCode;
    @WhereType(filed = "project_no", tableName = "main_project", type = WhereTypeEnum.LIKE)
    private String projectNo;
    @WhereType(filed = "machine_no", tableName = "main_project")
    private String machineNo;
    @WhereType(filed = "process_name", tableName = "main_process_order", type = WhereTypeEnum.LIKE)
    private String processName;
    @WhereType(filed = "drawing_no", tableName = "main_item", type = WhereTypeEnum.LIKE)
    private String drawingNo;
    @WhereType(filed = "part_no", tableName = "main_item", type = WhereTypeEnum.LIKE)
    private String partNo;
    @WhereType(deptTableName = "u", userTableName = "u")
    private Boolean dataScope;

    @WhereType(func = "(main_out.is_del = {1} or main_out_details.is_del={1})")
    private Boolean isDel;
    @WhereType(filed = "create_time", type = WhereTypeEnum.BETWEEN)
    private Date[] createTime;

    @WhereType(filed = "create_user_id")
    private Long createUserId;

    @WhereType(ignore = true)
    private String fromType;

}
